package com.xz.design.patterns.observer;

public class Client {

    public static void main(String[] args) {
        SubScriptionSubject subject  = new SubScriptionSubject();

        WeiXInUser user1 = new  WeiXInUser();
        user1.setName("name1");
        WeiXInUser user2 = new  WeiXInUser();
        user2.setName("name2");
        WeiXInUser user3 = new  WeiXInUser();
        user3.setName("name3");

        subject.attach(user1);
        subject.attach(user2);
        subject.attach(user3);

        subject.notify("通知消息");


    }
}
